package app.services.impl;

import java.util.List;

import app.models.Debito;
import app.repositories.DebitoRepository;
import app.repositories.Repository;
import app.services.DebitoService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class DebitoServiceImpl extends GenericServiceImpl<Debito, Long> implements DebitoService {

	private final DebitoRepository repository;
	
	public DebitoServiceImpl (DebitoRepository repository){
		this.repository = repository;
		super.setGenericRepository((Repository<Debito, Long>) repository);
	}
	
	public List<Debito> findByFilter(String filter) {
		return repository.findByFilter(filter);
	}
	
	public List<Debito> findAllOrdered() {
		return repository.findAllOrdered();
	}
	
	public List<Debito> findLastDebitos() {
		return repository.findLastDebitos();
	}
	
}
